
import { defineStore } from 'pinia'
import { ref } from 'vue'

import { useCounterStore } from './counter'


export const useHeadingStore = defineStore('heading', () => {
    const counter = useCounterStore()

    const msg = ref('Heading 的默认值')

    const reversedFun = () => {
        msg.value = msg.value.split('').reverse().join()
        console.log(counter)
        counter.reversedFun()
    }

    return { msg, reversedFun }
})

